#include "StdAfx.h"
#include "NamedInstanceBase.h"

using namespace Adaptive::Foundation;

/*--------------------------------------------------------------------------------
 * Constructor / Dispose / Destructor Methods
 *------------------------------------------------------------------------------*/
#pragma region Constructor / Dispose / Destructor Methods
// Initializes a new instance of the class.
NamedInstanceBase::NamedInstanceBase()
{
	_name = String::Empty;
}
// Class destructor.
NamedInstanceBase::~NamedInstanceBase()
{
	_name = nullptr;
}
#pragma endregion

/*--------------------------------------------------------------------------------
 * Public Properties
 *------------------------------------------------------------------------------*/
#pragma region Public Properties
// Gets a value indicating whether the object has been disposed.
String^ NamedInstanceBase::Name::get()
{
	return _name;
}
void NamedInstanceBase::Name::set(String^ value)
{
	if (value != _name)
	{
		_name = value;
		OnNameChanged(EventArgs::Empty);
	}
}
#pragma endregion

/*--------------------------------------------------------------------------------
 * Protected Methods / Event Methods
 *------------------------------------------------------------------------------*/
#pragma region Protected Methods / Event Methods
// Raises the <see cref="OnNameChanged"/> event.
void NamedInstanceBase::OnNameChanged(EventArgs^ e)
{
	NameChanged(this, e);
}
#pragma endregion
